home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 11 / Mac Magazin and MacEasy Magazine CD - Issue 11.iso / Sharewarebibliothek / Utilities / SGFFile Helper 1.2 ƒ / SGFFH1.2 ReadMe < prev    next >
Text File  |  1995-05-30  |  11KB  |  254 lines

  1. SGFFile Helper 1.2
  2.  
  3.  
  4. Introduction
  5.  
  6. I wrote SGFFile Helper because I was fed-up with having all these
  7. directories containing go games, without having an easy way to identify
  8. them. This program scans a directory (and optionally subdirectories),
  9. and displays the files containing games, plus some extra information,
  10. in a window. You can then double-click on one of the files displayed,
  11. and SGFFile Helper will launch the associated smart-go viewer. You can
  12. either open a directory from the File menu (using Open), or drop a
  13. folder onto it from the Finder.
  14.  
  15. It works on any Macintosh running at least System 7.
  16.  
  17.  
  18. More Information
  19.  
  20. The program looks at the files which are of filetype 'TEXT', 'SMGF' or
  21. 'ISHI'. The last two are the filetypes used by the Pon Nuki Go program,
  22. which I use to display my games with. Other files are ignored, but you
  23. can add other file types with ResEdit. Read Adding File Types if you
  24. want to add different file types.
  25.  
  26. After scanning the directory, each of the files is scanned, and some
  27. useful information (like the players’ names and rankings, and the
  28. outcome of the game) is extracted and displayed in a window.
  29.  
  30. The display left of the horizontal scroll bar shows the number of items
  31. that are displayed followed by the total number of items in the
  32. directory.
  33.  
  34. The scanning can be interrupted by pressing command period. If
  35. you cancel the scanning of the directories, the whole operation
  36. is cancelled (i.e. no window is opened). If you cancel while scanning
  37. the files, a window is openend showing the files scanned before
  38. you interrupted.
  39.  
  40.  
  41. Launching a Game Viewer
  42.  
  43. Double-clicking a file will launch the the program that created the
  44. file. This means that you might have to change the creator of the file
  45. to force the right program to be launched. Imagine, for example, that
  46. you downloaded some games using a communications program that saves
  47. text files as BBEdit files.  Double-clicking one of those files in
  48. SGFFile Helper will launch BBEdit, but you probably don’t want that.
  49. If you want them to be launched for example by the Pon Nuki Go
  50. application, you will have to change the files’ type and creator
  51. to "SMGF' and 'PONU' respectively.
  52.  
  53. You can use the 'Change Type/Creator...' option under the 'Sgf'
  54. menu to do this. It will pop up a dialog in which you can set the type
  55. and creator, and all files displayed in the top window will be changed.
  56. If you have a file selected, you have the option of only changing that
  57. file by checking the 'Selection only' checkbox in the file change dialog.
  58.  
  59. If you enter **** in one of the fields, that field will not be changed.
  60. This enables you to for example only change the file’s creator, and leave
  61. the file type to what it was.
  62.  
  63. If the application that is being launched cannot be found, or if there
  64. is not enough memory to launch it, the notification manager will send
  65. an alert from the Finder. That means that you won’t be able to read the
  66. alert until you switch to the Finder. The notification manager will put
  67. a diamond (◊) in front of the finder’s icon in the application menu (on
  68. the right of the menu bar), flash the application’s menu icon and beep,
  69. so you’ll know that there is something wrong.
  70.  
  71.  
  72. Changing the Font and Preferences
  73.  
  74. You can set the font and the size in which the files will be displayed
  75. before you open a folder. Once a folder has been opened, you can’t
  76. change them anymore.
  77.  
  78. The 'Copy' item in the 'Edit' menu copies the contents of the window to
  79. the clipboard. This can take a few seconds if you have hundreds of items
  80. in a window.
  81.  
  82. The preferences dialog contains two checkboxes and one editable field.
  83. The two checkboxes are used to set the following:
  84.  
  85. 1) If the 'Display all files' option is checked, all files of the recognised
  86. file types will be displayed, also if they don’t seem to contain a Go
  87. game. Unchecking it will only display files that do contain a game. You
  88. probably want to uncheck this if you have many text files in the same
  89. folder as game files.
  90.  
  91. 2) If you check the 'Scan sub folders' checkbox, folders within folders are
  92. also scanned.
  93.  
  94. You can also set the maximum depth to which folders inside folders
  95. are scanned. The default setting is 4, meaning that the scanning will go 
  96. four folders deep. You probably don’t want to change this value. It is really
  97. only useful to stop the program from going on for ever if you for
  98. example open a whole volume or harddisk from the 'Open…' dialog.
  99.  
  100.  
  101. Changing the Layout
  102.  
  103. If there are no windows open, you can change the layout of the
  104. information that is displayed. The (rather large) dialog that is
  105. displayed is fairly self-explanatory. It contains three groups of
  106. buttons.
  107.  
  108. 1) To display a field, click on one of the nine large buttons on the left.
  109.  
  110. 2) The three buttons in the middle are to correct mistakes. 'Delete' (or
  111.     the backspace key) delete the last item added. 'Clear' clears the whole line,
  112.     so you can start again, and 'Default' sets the default display.
  113.  
  114. 3) The seven buttons on the right are field-seperators. You can add
  115.     brackets, spaces or comma’s to the layout to make it better readable.
  116.  
  117. The vertical line is an end of line marker, it is not displayed.
  118.  
  119.  
  120. Adding and Removing a Filter
  121.  
  122. You can apply a filter to the files displayed in a window. This makes
  123. it possible to display only games between kyu players for example.
  124. The filtering uses standard regular expressions. For example,
  125. to display only games between kyu players, you could enter something
  126. like '\([0-9]*k.*\([0-9]*k', (without the quotes), and choose the 'any field'
  127. option in the left popup menu.
  128.  
  129. When adding a filter, you are presented with a dialog box. The popup
  130. menu on the left is used to select the field you want to filter. You
  131. can either choose one field, the line as it is displayed in the window
  132. (the 'any field' menu item), or the contents of the file. The last
  133. option allows you to filter on any string you want, not just the
  134. ones that are displayed.
  135.  
  136. In the user editable field, you can enter a regular expression.
  137.  
  138. The popup menu on the right lets you choose between keeping
  139. or removing matching items.
  140.  
  141. The progress bar below the popup menus shows you how far the
  142. filtering has progressed. You can interrupt the filtering by pressing
  143. command period.
  144.  
  145. You can see how many items are left after filtering in the small 
  146. display left of the horizontal scroll bar.
  147.  
  148. To display all files again, choose 'Remove Filter(s)' from the menu. This
  149. will remove all filters for a given window, not just the last one
  150. added.
  151.  
  152.  
  153. Sorting
  154.  
  155. The listing in the window can be sorted by choosing 'Sort…' from the 'Sgf'
  156. menu. You can choose the field you want to sort from a popup menu.
  157. The ranking fields are sorted in descending order (from 30k to dan
  158. levels), the other fields are sorted in ascending order. The sorting is
  159. case insensitive at the moment.
  160.  
  161. When you select 'Remove filter(s)', the sorting is “undone” as well.
  162.  
  163.  
  164. Adding File Types
  165.  
  166. There is a 'Ftyp' resource (with ID 128) which contains a list of
  167. the types that are scanned and displayed. Select the last row of
  168. '****'s in the resource, and select 'New Field' (or command-K).
  169. Enter the desired file type in the 'Filetype:' field. The 'Parse as:'
  170. field describes how the file is scanned. Use 0 for smgf files,
  171. 1 for files that contain a game in Ishi format, or 3 to let the
  172. program figure it out by itself. This last option is slower,
  173. because the program tries both the smart-go and Ishi formats
  174. to see which one is applicable.
  175.  
  176. The program uses the file type rather than the creator, because
  177. Pon Nuki Go for example also has file types which contain games
  178. in other formats.
  179.  
  180. You should only attempt this if you know how to use ResEdit. If
  181. you don’t, and you want to add a new file type, you can always
  182. e-mail me, and I will do it for you.
  183.  
  184.  
  185. Limitations
  186.  
  187. How many directories you can have opened depends on the amount of memory
  188. you give the program. You can change the amount in the finder (select the
  189. application, and choose 'Get info…' from the file menu.
  190.  
  191. Secondly, the program needs time to scan a directory and the files.
  192. Scanning a directory with about 300 files takes about a minute on
  193. my LC before the text is displayed (it’s one of the slowest Macs around
  194. though). But then again, just opening a directory with that many items
  195. in the Finder on my LC is just as time consuming.
  196.  
  197. The scanning of the different fields is done in a fairly ad hoc manner.
  198. Multiple games inside a file are not recognised, nor are all the fields
  199. recognised: only the ones that are needed.
  200.  
  201.  
  202. Known Bugs
  203.  
  204. The program checks if there is enough memory available. If not, an alert
  205. is displayed. This goes occasionally wrong when the application
  206. encounters low memory conditions while scanning a directory (while
  207. the spinning cursor is being displayed), and it will quit. 
  208. Give it more memory from the finder, or lower the depth to which
  209. subfolders are scanned in the 'preferences…' dialog to cure this. 
  210.  
  211. Sometimes the directory name is not displayed until you click a few
  212. times in the Open dialog.
  213.  
  214. There is a 'Save as…' option in the 'File' menu. This doesn’t do anything
  215. yet, so don’t be alarmed because it is always dimmed.
  216.  
  217.  
  218. Finally
  219.  
  220. I hope you like this, and find it useful. It is shareware; you can try
  221. it out for two weeks, but if you decide to keep it, you should pay the
  222. shareware fee (the fee is US$ 10,- or 15 Dutch guilders, or anything
  223. that’s about equal). Or at least send me some e-mail saying whether you
  224. like or hate the program.  Or tell me about bugs or things you want to
  225. see changed. If you have paid for one version, you of course don't have
  226. to pay for any updates.  I take no reponsibility of any kind, so use
  227. this at your own risk. It has been written and tested on a Mac LC 4/240.
  228. Some testing was done on a Quadra 900 and a IIcx.
  229.  
  230. The files in the Example folder have been taken from the igs archives.
  231. I guess these are public, so I hope that’s okay.
  232.  
  233. Credits:
  234. •Eddy J. Gurney (egurney@vcd.hp.com) for the progress bar CDEF.
  235. •Chris Larson (cklarson@engr.ucdavis.edu) for the StandardGetFolder
  236.   code.
  237. •Ari Halberstadt (ari@world.std.com) for the PopUpCDEF.
  238.  
  239. Any redistribution of SGFFile Helper 1.2 must also include this Read Me
  240. file, the version history and the example folder. I do not permit
  241. distribution on cd-rom, disks for sale (e.g. shareware catalogues or
  242. magazine cover disks) or any other carrier unless I receive a copy of
  243. the cd-rom, disk, or storage medium upon which it appears.
  244.  
  245. My adres is:
  246. Peter Berck
  247. Sparrenstraat 1
  248. 5038 MJ  Tilburg
  249. The Netherlands
  250.  
  251. e-mail: Peter.Berck@kub.nl
  252. or     : berck@uia.ua.ac.be
  253.  
  254.